﻿using System;
using System.Windows;
using System.Windows.Controls;
using Microsoft.Win32;

namespace Automator.Tasks.Windows
{
    public partial class CallTaskEditWindow : Window
    {
        public CallTaskEditWindow()
        {
            InitializeComponent();
        }
        
        private void BtnOpen_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();
            dialog.CheckPathExists = true;
            dialog.DefaultExt = ".exe";
            dialog.DereferenceLinks = true;
            dialog.Filter = "Executable Files (*.exe)|*.exe";
            dialog.Multiselect = false;
            dialog.Title = "Choose File";
            dialog.ValidateNames = true;
            if (dialog.ShowDialog(this).Value)
            {
                edtExeFile.Text = dialog.FileName;
            }
        }
    }
}